<?php
/**
* Config for ABSoft Banner module
* 
* @version 1.0
* @author trungdt
* @since Apr 2, 2011
*/

class abhtml5module_config {
	function form($object) {
		if (!defined('SYS_FORMS')) require_once(BASE.'subsystems/forms.php');
		exponent_forms_initialize();

		$form = new form();
		if (!isset($object->id)) {
			$object->show_type = 0;
			$object->mwidth = 960;
			$object->mheight = 310;
			           
            
            $object->pauseTime    =60000;
            $object->animationTime= 921;
			
		} else {
			
			$form->meta('id',$object->id);
		}
				
		$form->register('mwidth','Module Width',new textcontrol($object->mwidth,50,false,100,"",true));
		$form->register('mheight','Module Height',new textcontrol($object->mheight,50,false,100,"",true));
		$form->register('animationTime','Animation Time',new textcontrol($object->animationTime,50,false,100,"",true));
        $form->register('pauseTime','Pause Time',new textcontrol($object->pauseTime,50,false,100,"",true));
				
		$form->register('submit','',new buttongroupcontrol('Save','','Cancel'));
		return $form;
	}

	function update($values,$object) {
		$object->pauseTime = intval($values['pauseTime']);
		$object->animationTime = intval($values['animationTime']);
		$object->mwidth = intval($values['mwidth']);
		$object->mheight = intval($values['mheight']);
		return $object;
	}
}

?>